# Contributor: Michael P <ptchinster@archlinux.us>
# Contributor: ice-man <icemanf@gmail.com>
# Contributor: sergeantspoon <sergeantspoon@archlinux.us>

pkgname=hydra
pkgver=5.4
pkgrel=6
pkgdesc="A very fast network logon cracker which support many different services"
depends=('openssl' 'postgresql-libs' 'apr' 'apr-util' 'libssh')
source=("http://freeworld.thc.org/releases/$pkgname-$pkgver-src.tar.gz"
"http://0xbadc0de.be/libssh/hydra-libssh0.2.patch")
url="http://www.thc.org/thc-hydra/"
md5sums=('fa08b465d19321e77b1a0ef912eeecc1' '50b3eade0ef55c63ad542d786bc4ac9f')
arch=('i686' 'x86_64')
license="GPL"

build() {

	echo 'If this PKGBUILD fails - try an alternitive posted on the packages AUR page.'

	mkdir -p $pkgdir/usr/bin

	cd $srcdir/$pkgname-$pkgver-src

	# Allows hydra to work with libssh>0.1
	patch -p1 -i ../hydra-libssh0.2.patch

	# Fixes some weird file-location stuff
	sed -i s/apr-0/apr-1/g configure
	sed -i s/aprutil-0/aprutil-1/g configure

	./configure --prefix=$pkgdir/usr || return 1
	make || return 1
	make install || return 1

} 

